package fmu.pi.utils;

import java.math.BigDecimal;
import java.text.NumberFormat;

import javafx.scene.control.TextField;

public class FXUtils {
	
	public static void setCurrencyValue(TextField t, BigDecimal valor){
		t.setText(NumberFormat.getCurrencyInstance().format(valor));
		t.setStyle(valor.doubleValue() < 0? "-fx-text-fill: red;": "-fx-text-fill: green;" );	
	}

}
